<div ng-include="'components/navbar/navbar.html'"></div>

<div class="container">
  <div class="row">
    <div class="col-sm-12">
      <h1>登陆</h1>
      <p>Accounts are reset on server restart from <code>server/config/seed.js</code>. 默认帐号是 <code>test@test.com</code> / <code>test</code></p>
      <p>管理员帐号为 <code>admin@admin.com</code> / <code>admin</code></p>
    </div>
    <div class="col-sm-12">
      <form class="form" name="form" ng-submit="login(form)" novalidate>

        <div class="form-group">
          <label>邮箱</label>

          <input type="email" name="email" class="form-control" ng-model="user.email" required>
        </div>

        <div class="form-group">
          <label>密码</label>

          <input type="password" name="password" class="form-control" ng-model="user.password" required>
        </div>

        <div class="form-group has-error">
          <p class="help-block" ng-show="form.email.$error.required && form.password.$error.required && submitted">
             请输入您的邮箱和密码.
          </p>
          <p class="help-block" ng-show="form.email.$error.email && submitted">
             请输入一个有效的邮箱地址.
          </p>

          <p class="help-block">{{ errors.other }}</p>
        </div>

        <div>
          <button class="btn btn-success btn-login" type="submit">
            登陆
          </button>
        </div>

      </form>
    </div>
  </div>
  <hr>
</div>
